package com.muqi.app.im.adapter;

import java.util.List;

import com.bumptech.glide.Glide;
import com.easemob.easeui.widget.CircularImage;
import com.muqi.app.modle.bean.MineMyRewardBean;
import com.muqi.app.qlearn.modles.SearchFriends;
import com.muqi.app.qlearn.student.R;
import com.muqi.app.user.widget.SelectableRoundedImageView;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.TextView;

public class MinePraizeSettingAdapter extends DefaultAdapter<MineMyRewardBean>{
	
	public MinePraizeSettingAdapter(Context context, List<MineMyRewardBean> listData) {
		super(context, listData);
	}

	@Override
	public View getView(final int position, View convertView, ViewGroup parent) {
		ViewHolder holder;
//		final MineMyRewardBean friendInfo = listData.get(position);
		if (convertView == null) {
			holder = new ViewHolder();
			convertView = LayoutInflater.from(context).inflate(R.layout.mine_praizesetting_list_item, null);
			holder.selectableRoundedImageView = (SelectableRoundedImageView) convertView.findViewById(R.id.mine_myreward_list_item_image);
			holder.name = (TextView) convertView.findViewById(R.id.mine_myreward_list_item_name);
			holder.consume = (TextView) convertView.findViewById(R.id.mine_myreward_list_item_consume);
			holder.state = (TextView) convertView.findViewById(R.id.mine_myreward_list_item_state);
			holder.time = (TextView) convertView.findViewById(R.id.mine_myreward_list_item_time);
			convertView.setTag(holder);
		} else {
			holder = (ViewHolder) convertView.getTag();
		}
		
//		Glide.with(context).load(friendInfo.fileurl).dontAnimate().placeholder(R.drawable.ease_default_avatar).into(holder.friendAvatar);
//		holder.friendName.setText(friendInfo.nickname);
		return convertView;
	}
	
	public static class ViewHolder {
		SelectableRoundedImageView selectableRoundedImageView;
		TextView name;
		TextView consume;
		TextView state;
		TextView time;
		
	}
}
